#include "common.hpp"
#include "PollServer.hpp"


void User(const char* agrv)
{
    std::cout<<"User should: "<< agrv <<" port"<<std::endl;
    exit(USER_ERR);
}

int main(int argc,char* argv[])
{
    if(argc != 2)
    {
        User(argv[0]);
    }
    uint16_t port = std::stoi(argv[1]);

    std::unique_ptr<PollServer> serve = std::make_unique<PollServer>(port);

    serve->start();
    return 0;
}